package com.yhsimon.responsibilitychain;

/**
 * @author： YHSimon
 * @date： 2021-10-24 15:21
 */
public class Client {
    public static void main(String[] args) {
        PurchaseRequest purchaseRequest = new PurchaseRequest(1, 1, 30001);

        //创建相关的审批人
        DepartmentApprover da = new DepartmentApprover("张主任");
        CollegeApprover ca = new CollegeApprover("王院长");
        ViceSchoolMasterApprover vsma = new ViceSchoolMasterApprover("李副校长");
        SchoolMasterApprover sma = new SchoolMasterApprover("吴校长");
        da.setApprover(ca);
        ca.setApprover(vsma);
        vsma.setApprover(sma);

        da.processRequest(purchaseRequest);
    }
}
